package com.dq.service.order;

import com.dq.exception.customException.AdminException;
import com.dq.controller.in.orders.UserOrderReturnQuery;
import com.dq.controller.in.orders.UserOrderReturnSave;
import com.dq.vo.Vo;
import com.dq.domain.orders.UserOrderReturn;
import com.dq.domain.orders.info.OrderInfo;

import java.util.List;

/**
 * @author cf
 *
 * 岗位逻辑
 *
 */
public interface UserOrderReturnService {
    /**
     * 退货单列表
     * @param userOrderReturnQuery
     * @return
     * @throws AdminException
     */
    public Vo list(UserOrderReturnQuery userOrderReturnQuery) throws AdminException;

    /**
     * 获取退货单详情
     * @param userOrderId
     * @return
     */
    public List<OrderInfo.OrgOrderInfoVo> getUserOrderInfo(Long userOrderId);
    /**
     * 退货单生成逻辑
     * @param userOrderReturnSave
     * @return
     * @throws AdminException
     */
    public UserOrderReturn manualSave(UserOrderReturnSave userOrderReturnSave, UserOrderReturn.OrderReStatus status) throws AdminException;
    /**
     * 添加 退货单实体 main_info
     * @param
     * @return
     * @throws AdminException
     */
    public UserOrderReturn saveMainAndInfo(UserOrderReturn userOrderReturn, List<OrderInfo> orderInfoList) throws AdminException;

    /**
     * 退单审批/退单完成
     * @param id
     * @param status
     * @return
     * @throws AdminException
     */
    public UserOrderReturn examine(Long id, UserOrderReturn.OrderReStatus status, String remark) throws AdminException;
    /**
     * 修改 退货单
     * @param userOrderReturn
     * @return
     * @throws AdminException
     */
    public UserOrderReturn update(UserOrderReturn userOrderReturn) throws AdminException;
    /**
     * 扣除返佣
     */

    public void less(UserOrderReturn userOrderReturn);
}
